﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ScrumTime.Models;

namespace ScrumTime.ViewModels
{
    public class UserCollectionViewModel 
    {

        static IMembershipService membershipService;

        public List<UserViewModel> UserViewModels { get; set; }

        public UserCollectionViewModel()
        {
            
        }

        private void add(UserViewModel userView) {
            this.UserViewModels.Add(userView);
        }

        public static void checkMembershipService() {
            if (membershipService == null)
            {
                membershipService = new AccountMembershipService();
            }
            
        }

        //public static UserCollectionViewModel BuildByNameAlphabetical()
        //{
        //    ScrumTimeEntities scrumTimeEntities = new ScrumTimeEntities();
        //    UserCollectionViewModel userCollectionViewModel = new UserCollectionViewModel();

        //    foreach (System.Web.Security.MembershipUser m_user in membershipService.GetAllUsers() ) {
        //        UserViewModel userViewModel = new UserViewModel();
        //        userCollectionViewModel.add(userViewModel);
        //    }

        //    return userCollectionViewModel;
        //}
    }
}